#ifndef SET_H
#define SET_H

#include <assert.h>
#include "New.h"

struct Set
{
	const struct TypeDescriptor * type;
	unsigned int count;
};


void * add (void * set, const void * element);
void * find (const void * set, const void * element);
void * drop (void * set, const void * element);
int contains (const void * set, const void * element);

int differ (const void * a, const void * b);

static int Set_differ (const void * self, const void * b)
{
	return self != b;
}

static void * Set_ctor (void * _self, va_list * app)
{
	struct Set * self = _self;
	self->count = va_arg(*app, int);
	return self;
}


static void * Set_dtor(void * _self)
{
	struct Set * self = _self;
	return self;
}


static const struct TypeDescriptor _Set =
{
	sizeof(struct Set),
	Set_ctor,
	Set_dtor,
	Set_differ
};




#endif